package com.codingman.springdemo5;

import org.springframework.expression.ExpressionParser;
import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext;

public class Demo3 {
	public static void main(String[] args) {
		Calc calc = new Calc();

		StandardEvaluationContext context = new StandardEvaluationContext(calc);
		ExpressionParser parser = new SpelExpressionParser();
		parser.parseExpression("number").setValue(context, "5");

		System.out.println(calc.cube());
	}
}
